// 装车列表
const {DataTypes, db } = require("../db");
db.define('cargo', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
tenantId:{type: DataTypes.INTEGER,allowNull:false,comment:'租户'}, 
billNo:{type: DataTypes.STRING(20),allowNull:false,comment:'装车票号'}, 
billDate:{type: DataTypes.STRING(10),allowNull:false,comment:'装货日期'}, 
carsId:{type: DataTypes.INTEGER,allowNull:false,comment:'车辆ID'}, 
licence:{type: DataTypes.STRING(50),allowNull:false,comment:'车牌号'}, 
driverId:{type: DataTypes.INTEGER,allowNull:false,comment:'司机ID'}, 
driverName:{type: DataTypes.STRING(50),allowNull:false,comment:'司机'}, 
deliverIds:{type: DataTypes.STRING(200),allowNull:false,comment:'送货员ids'}, 
deliverNames:{type: DataTypes.STRING(200),allowNull:false,comment:'送货员s'}, 
cby:{type: DataTypes.INTEGER,comment:'创建人'}, 
cbyName:{type: DataTypes.STRING(20),comment:'创建人'}, 
createdAt:{type: DataTypes.STRING(20),comment:'创建时间'}, 
updatedAt:{type: DataTypes.STRING(20),comment:'更新时间'}, 
state:{type: DataTypes.INTEGER,defaultValue:1,comment:'0未装车1已装车2已送货完成3删除'}, 
doneBy:{type: DataTypes.INTEGER,comment:'完成确认人'}, 
doneByName:{type: DataTypes.STRING(50),comment:'完成确认人'}, 
printNo:{type: DataTypes.INTEGER,defaultValue:0,comment:'打印次数'}, 
areaId:{type: DataTypes.INTEGER,defaultValue:0,comment:'装车的区域ID'}, 
searchTxt:{type: DataTypes.STRING(4000),comment:'相关信息方便查询'}, 
ctime:{type: DataTypes.STRING(20),comment:''}, 
uby:{type: DataTypes.INTEGER,comment:''}, 
utime:{type: DataTypes.STRING(20),comment:''}, 

}, {
    tableName: 'cargo',
    timestamps: false,
    comment: '装车列表'
});